	@include('admin.head')
	<style>
	.search-field
	{
		margin-bottom: -1px!important;
		margin-top: 1px!important;
		width: 20%!important;
	}
	</style>
	<div class="container">
		<div class="row">
			@include('admin.side')
			<div class="col-md-10" id="content-wrapper">
				<div class="row">
					<div>
					<div class="row">
						<div class="col-lg-12">
							<div class="main-box clearfix">
								<div class="table-responsive">
									<table class="table user-list" id="all-users">
										<thead>
											<tr>
												<th data-column-id="u_id"><span>ID</span></th>
												<th data-column-id="nickname" data-sortable="false"><span>昵称</span></th>
												<th data-column-id="account" data-formatter="account" data-sortable="false"><span>账号</span></th>
												<th data-column-id="contact_way" data-sortable="false"><span>联系方式</span></th>
												<th data-column-id="role_id" data-formatter="role_id" data-sortable="false"><span>类型</span></th>
												<th data-column-id="validate_state" data-formatter="validate_state" data-sortable="false"><span>审核</span></th>
												<th data-column-id="state" data-formatter="state" data-sortable="false"><span>状态</span></th>
												<th data-sortable="false" data-formatter="commands"><span>操作</span></th>
											</tr>
										</thead>
										<tbody>
										</tbody>
									</table>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	@include("admin.footer")
	@include("admin.common")
	<script type="text/javascript">
	var labelsSetting = {
		infos: "当前第 {{ctx.start}} 条 到 {{ctx.end}} 条 共 {{ctx.total}} 条数据",
		search: "搜索",
		loading: "正在加载...",
		noResults: "未找到您要的数据...",
		refresh: "刷新",
		all: "全部"
	};
	$("#all-users").bootgrid({
		rowCount: [10, 25, 50],
	    ajax:true,
	    url:"uc/get_user_list",
	    labels:labelsSetting,
	    formatters: {
	    	"commands": function(k,row){
	    		return '<a href="javascript:void(0);" uid="'+row.u_id+'" class="table-link doEdit"><span class="fa-stack"><i class="fa fa-square fa-stack-2x"></i><i class="fa fa-pencil fa-stack-1x fa-inverse"></i></span></a>';
	    	},
	    	"validate_state": function(k, v){
	    		switch (v.validate_state){
	    			case 0:
	    				return '未认证';
	    				break;
	    			case 1:
	    				return '待审核';
	    				break;
	    			case 2:
	    				return '审核通过';
	    				break;
	    			case 3:
	    				return '审核不通过';
	    				break;
	    			default:
	    				break;
	    		}
	    	},
	    	"role_id": function(k, v){
	    		switch (v.role_id){
	    			case 1:
	    				return '普通用户';
	    				break;
	    			case 2:
	    				return '用能公司';
	    				break;
	    			case 3:
	    				return '节能服务公司';
	    				break;
	    			case 4:
	    				return '设备机构提供商';
	    				break;
	    			case 5:
	    				return '第三方服务机构';
	    				break;
	    			case 6:
	    				return '行业协会';
	    				break;
	    			case 7:
	    				return '政府部门';
	    				break;
	    			default:
	    				break;
	    		}
	    	},
	    	"state": function(k, v){
	    		switch (v.state){
	    			case 0:
	    				return '正常';
	    				break;
	    			case 1:
	    				return '冻结';
	    				break;
	    			case 2:
	    				return '封号';
	    				break;
	    			default:
	    				break;
	    		}
	    	},
	    	"account": function(k, v){
	    		if(v.cell_phone){
	    			return v.cell_phone;
	    		}else if(v.email){
	    			return v.email;
	    		}else{
	    			return;
	    		}
	    	}

	    }
	}).on("loaded.rs.jquery.bootgrid", function (e)
    {
    	$('.doEdit').bind('click',function(){
    		var uid = $(this).attr('uid');
    		window.location.href="uc/message?uid="+uid+"";
    	})
    });
	//$("#all-users-header").hide();

	// var searchValue=$('.search-field').val().trim();
$(".btn-group").hide();

	</script>


</body>
</html>